[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------+#################################################################
#+-| UNLOCK |---------------------------------------+#########################
#| +--------+ The UNLOCK command releases a file or |#########################
#| record lock in the current work area |#########################
#+--------------------------------------------------+#########################
##############################################################################
##############################################################################
#+--| Syntax |---------------+################################################
#| [!<Alias>] UNLOCK |################################################
#+---------------------------+################################################
##############################################################################
##############################################################################
############+---| Description |----------------------------------+############
############| UNLOCK removes all locks in the current work area, |############
############| regardless of whether the active lock is a file |############
############| lock or a record lock. |############
############+----------------------------------------------------+############
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Unlock a record after a user has edited the record. |#########
#########| |#########
#########| PROCEDURE edit_record |#########
#########| PARAMETERS CONST CHAR(14) the_name, ALIAS z |#########
#########| |#########
#########| IF .NOT. a_rlock( z ) |#########
#########| IF .NOT. willing_to_wait() |#########
#########| RETURN |#########
#########| ENDIF |#########
#########| ENDIF |#########
#########| @ x,y GET the_name |#########
#########| UNLOCK |#########
#########| |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Unlock a database file after it has been indexed. |#########
#########| |#########
#########| IF flock() |#########
#########| INDEX index_alias |#########
#########| UNLOCK |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
OPEN
USE
a_flock()
a_rlock()
flock()
rlock()
net_err()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson